<template>
	<view>
	<view v-if="productType==1&&productId!=10551&&productId!=10538" style="width: 750rpx;height: 100rpx;background-color: #ffffffdd;display: flex;flex-direction: column;align-items: center;justify-content: center;">
		<text style="color:#11c35a;border-bottom: 2rpx #11c35a solid;" @click="showAgreement()">《锦绣潇湘文旅卡协议》</text>
		<text style="margin-top: 5rpx;">点击立即购买表示已阅读并同意</text>
	</view>
	<view style="width: 750rpx;height: 128rpx;background-color: #fff;display: flex;align-items: center;">
		<view style="display: flex;width: 300rpx;height: 98rpx;">
			<view style="display: flex;align-items: center;justify-content: center;flex-direction: column;flex: 1;" @tap='toMy()'>
				<view style="display: flex;align-items: center;justify-content: center;height: 40rpx;">
					<image src="http://cdn.hntgov.net/online/static/f_wode.png" style="width: 36rpx;height: 40rpx;"></image>
				</view>
				
				<text style="color:#373434;margin-top: 8rpx;font-size: 20rpx;">我的</text>
			</view>
			<!-- <view style="display: flex;align-items: center;justify-content: center;flex-direction: column;flex: 1;">
				<view style="display: flex;align-items: center;justify-content: center;height: 40rpx;">
					<image src="http://cdn.hntgov.net/online/static/f_car.png" style="width: 42rpx;height: 36rpx;"></image>
				</view>
				
				<text style="color:#373434;margin-top: 8rpx;font-size: 20rpx;">购物车</text>
			</view> -->
			<view style="display: flex;align-items: center;justify-content: center;flex-direction: column;flex: 1;"  @tap='toMall()'>
				<view style="display: flex;align-items: center;justify-content: center;height: 40rpx;">
					<image src="http://cdn.hntgov.net/online/static/f_main.png" style="width: 42rpx;height: 38rpx;"></image>
				</view>
				
				<text style="color:#373434;margin-top: 8rpx;font-size: 20rpx;">首页</text>
			</view>
		</view>
		

			<view class="jia_gouwuche2" @click="buyProduct" v-if="isGroup">
				<text>￥{{marketPrice}}</text>
				<text>单独购买</text></view>
				<view class="jia_gouwuche2" @click="groupBuy" v-if="isGroup">
					<text>￥{{salePrice}}</text>
					<text>立即拼团</text></view>
			<view class="jia_gouwuche1" @click="buyProduct" v-if="!isGroup">立即抢购</view>
	</view>
	</view>
</template>

<script>
	export default {
		name:"buy-car",
		props:{
			productType:{
				type: Number,
				default: 1
			},
			productId:{
				type: Number,
				default: 1
			},
			isGroup:{
				type: Boolean,
				default: false
			},
			salePrice:{
				type:Number,
				default:0
			},
			marketPrice:{
				type:Number,
				default:0
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			buyProduct(){
				this.$emit('buyProduct')
			},
			groupBuy(){
				this.$emit('groupBuy')
			},
			toMy(){
				this.$emit('toMy')
			},
			toMall(){
				this.$emit('toMall')
			},
			showAgreement(){
				this.$emit('showAgreement')
			}
		}
	}
</script>

<style scoped>
.jia_gouwuche{
	width: 208rpx;
	height: 80rpx;
	border-radius: 16rpx;
	text-align: center;
	line-height: 80rpx;
	font-size: 28rpx;
	color: #ED2D38;
	border: 1rpx solid #ED2D38;
		margin-left: 12rpx;
}
.jia_gouwuche1{
	width: 408rpx;
	height: 80rpx;
	background: linear-gradient(90deg, #FF3F3C -8%, #FFA371 107%);
	border-radius: 16rpx;
	text-align: center;
	line-height: 80rpx;
	font-size: 28rpx;
	color: #fff;
	margin-left: 12rpx;
}

.jia_gouwuche2{
	width: 200rpx;
	height: 80rpx;
	background-color: #ED2D38;
	border-radius: 16rpx;
	font-size: 24rpx;
	color: #fff;
	margin-left: 12rpx;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
</style>
